<script setup lang='ts'>
import { provide, ref, type Ref } from 'vue';
import FatherComp from './components/FatherComp.vue';

const money = ref(1000)
const changeMoney = (newMoney: number): void => {
  money.value += newMoney
}

provide<Ref<number>>('money', money)
provide<(newMoney: number) => void>('changeMoney', changeMoney)
</script>

<template>
  <div class="app-page" style="border: 10px solid #ccc; padding: 50px; width: 600px">
    app 组件 {{ money }}
    <FatherComp />
  </div>
</template>

<style scoped></style>